class ProductsComponent < ActiveRecord::Base
  has_many :components,:class_name=>"Product" ,:foreign_key=>"component_id"
  has_many :products,:class_name=>"Product" ,:foreign_key=>"product_id"
  belongs_to :component,:class_name=>"Product" ,:foreign_key=>"component_id"                                                                
  belongs_to :product ,:class_name=>"Product" ,:foreign_key=>"product_id"

end
